﻿{% extends "gma/base.html" %}
{% load mytag %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__hd">
    <h1 class="page__title">
        <i class="fa fa-phone-volume weui_grid_icon_fa" style="font-size: 32px;"> </i>
    </h1>
    <p class="page__desc"> {{ day }} 有效视频通话记录。 </p>
</div>

<div class="page__bd">
    <div class="weui-panel">
        <div class="weui-panel__bd">
        {% for log in logs %}
            <a href="{% url 'gma:video_chat_log' log.id log.caller_uid log.callee_uid %}" class="weui-media-box weui-media-box_appmsg weui-cell_access">
                <div class="weui-media-box__hd">
                    <img class="weui-media-box__thumb avatar" src="{{ log.caller_avatar|cdn }}" alt="">
                </div>

                <i class="fa fa-phone-volume"></i>
                &nbsp; &nbsp;
                <div class="weui-media-box__hd">
                    <img class="weui-media-box__thumb avatar" src="{{ log.callee_avatar|cdn }}" alt="">
                </div>

                <div class="weui-media-box__bd">
{#                    <p class="weui-media-box__desc"> {{ log.pos }} </p>#}
                    <p class="weui-media-box__desc"> <small>{{ log.begin_time|date:"H:i:s" }}~{{ log.end_time|date:"H:i:s" }} </small></p>
                    <p class="weui-media-box__desc">时长: {{ log.chat_seconds|readable_seconds }} </p>

                    {% if log.status == 1 %}
                        <p class="weui-media-box__desc"> <span class="blue_color">{{ log.status|call_status }}</span></p>
                    {% elif log.status == 2 %}
                        <p class="weui-media-box__desc"> <span class="red_color">{{ log.status|call_status }}</span></p>
                    {% elif log.status == 3 %}
                        <p class="weui-media-box__desc"> <span class="yellow_color">{{ log.status|call_status }}</span></p>
                    {% elif log.status == 4 %}
                        <p class="weui-media-box__desc">
                            <span class="green_color">{{ log.status|call_status }}</span>
                            {% if log.terminator_is_caster %}
                                <span class="red_color">(主播挂断)</span>
                            {% endif %}
                        </p>
                    {% else %}
                        <p class="weui-media-box__desc">状态: {{ log.status|call_status }} </p>
                    {% endif %}

                    {% if log.has_refund != 0 %}
                        <p class="weui-media-box__desc"> <span class="red_color"> <i class="fa fa-money-bill-alt"></i> 已退款! </span></p>
                    {% endif %}
                </div>

                <div class="weui-cell__ft">
                    {% if log.expense > 0 %}
                        <div>
                            {% if log.has_refund != 0 %}
                                <span class="red_color">{{ log.expense }} <i class="fa fa-gem"></i></span>
                            {% else %}
                                {{ log.expense }} <i class="fa fa-gem"></i>
                            {% endif %}
                        </div>
                    {% endif %}
                </div>
            </a>
        {% endfor %}
        </div>
    </div>
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
{% endblock extra_js %}